/*
 * codec_manager.h
 *
 *  Created on: Dec 1, 2016
 *      Author: lwang
 */

#ifndef INCLUDE_CODEC_MANAGER_H_
#define INCLUDE_CODEC_MANAGER_H_

#include <boost/unordered_map.hpp>
#include <iostream>
#include <string>

#include "./encoder/encoder_includes.h"
#include "./decoder/decoder_includes.h"

using namespace std;
using namespace cv;

class CodecManager {

public:
	CodecManager();
	~CodecManager();

	BaseEncoder* getEncoderById(string encoder_id);
	BaseDecoder* getDecoderById(string decoder_id);
	int registerEnocder(string encoder_id, CODEC_TYPE codec_type, int width, int height);
	int registerDeocder(string decoder_id, CODEC_TYPE codec_type);
	void releaseEncoder(string encoder_id);
	void releaseDecoder(string decoder_id);

private:
	boost::unordered_map<string, BaseEncoder*> encoders;
	boost::unordered_map<string, BaseDecoder*> decoders;
};



#endif /* INCLUDE_CODEC_MANAGER_H_ */
